# -*- coding: utf-8 -*-
import scrapy
from manhua.items import ManhuaItem


class Manhua1Spider(scrapy.Spider):
    name = "manhua1"
    allowed_domains = ["cnc.dm5.com"]
    start_urls = (
        'http://cnc.dm5.com/manhua-hktw/',
    )

    def parse(self, response):
        item = ManhuaItem()
        response.xpath('//li[@class="red_lj"]/a[1]')
        item['name'] = response.xpath('//li[@class="red_lj"]/a[1]/@title').extract()
        item['url_part'] = response.xpath('//li[@class="red_lj"]/a[1]/@href').extract()
        yield item
